package com.mida.app.report.vo.request.reqeustform;

import com.alibaba.excel.util.StringUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("预约列表查询vo")
public class RegistrationListRequest {

    @ApiModelProperty(name = "pageStart", value = "页码", dataType = "String", example = "1")
    private Integer pageStart;

    @ApiModelProperty(name = "pageSize", value = "分页大小", dataType = "String", example = "10")
    private Integer pageSize;

    @ApiModelProperty(name = "personName", value = "患者姓名", dataType = "String", example = "xu")
    private String personName;

    @ApiModelProperty(name = "customerSoid", value = "患者角色soid", dataType = "String", example = "xu")
    private String customerSoid;

    @ApiModelProperty(name = "timeType", value = "时间类型", dataType = "TimeTypeEnum", example = "")
    private String timeType;

    @ApiModelProperty(name = "startDate", value = "开始时间", dataType = "String", example = "2021-05-06 18:00:00")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startDate;

    @ApiModelProperty(name = "endDate", value = "结束时间", dataType = "String", example = "2021-05-06 18:00:00")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endDate;

    @ApiModelProperty(name = "requestStatus", value = "申请单状态", dataType = "String", example = "14")
    private List<String> requestStatus;

    @ApiModelProperty(name = "requestSoid", value = "申请单soid", dataType = "String", example = "14")
    private String requestSoid;

    @ApiModelProperty(name = "emergencySign", value = "紧急度", dataType = "String", example = "")
    private String emergencySign;

    @ApiModelProperty(name = "examServiceType", value = "检查类型", dataType = "String", example = "")
    private String examServiceType;

    @ApiModelProperty(name = "requestionId", value = "申请单号", dataType = "String", example = "")
    private String requestionId;

    @ApiModelProperty(name = "examinationVisitSoid", value = "检查号", dataType = "String", example = "")
    private String examinationVisitSoid;

    @ApiModelProperty(name = "stPatientId", value = "影像号", dataType = "String", example = "")
    private String stPatientId;

    @ApiModelProperty(name = "beInHospitalNo", value = "住院号", dataType = "String", example = "")
    private String beInHospitalNo;

    @ApiModelProperty(name = "clinicCardNo", value = "门诊号", dataType = "String", example = "")
    private String outPatientNo;

    @ApiModelProperty(name = "filmStatus", value = "胶片状态", dataType = "String", example = "")
    private String filmStatus;

    @ApiModelProperty(name = "deviceType", value = "设备类型", dataType = "String", example = "")
    private String deviceType;

    @ApiModelProperty(name = "deviceDetail", value = "设备明细", dataType = "String", example = "")
    private String deviceDetail;

    /**
     * 就诊流水号(住院号或门诊号基于病人类型)
     */
    @ApiModelProperty(name = "inpatientNo", value = "住院号或门诊号", dataType = "String")
    private String inpatientNo;

    @ApiModelProperty(name = "visitScene", value = "就诊场景", dataType = "String", example = "")
    private String visitScene;

    /**
     * 就诊卡
     */
    @ApiModelProperty(name = "clinicCardNo", value = "就诊卡", dataType = "String")
    private String clinicCardNo;

    /**
     * 就诊卡类型
     */
    @ApiModelProperty(name = "clinicCardType", value = "就诊卡类型", dataType = "String", example = "")
    private String clinicCardType;

    @ApiModelProperty(name = "examPart", value = "检查部位", dataType = "String")

    private String examPart;

    @ApiModelProperty(name = "examMethod", value = "检查方法", dataType = "String")
    private String examMethod;

    //根据是否传参isBooking判断是走预约还是走登记
    @ApiModelProperty(name = "isBooking", value = "是否设置预约", dataType = "Boolean")
    private Boolean isBooking;

    @ApiModelProperty(name = "msdServiceInstanceSoid", value = "检查服务实例soid", dataType = "String")
    private String msdServiceInstanceSoid;

    public Integer getPageStart() {
        return StringUtils.isEmpty(this.pageStart) ? 1 : this.pageStart;
    }

    public Integer getPageSize() {
        return StringUtils.isEmpty(this.pageSize) ? 10 : this.pageSize;
    }
}
